package com.aixx.springcloud.contorller;

import com.aixx.springcloud.entities.CommonResult;
import com.aixx.springcloud.entities.Payment;
import com.aixx.springcloud.service.PaymentFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.Random;

/**
 * @author shkstart
 * @create 2021-01-29 5:58
 */

@RestController
public class CustomerFeignController {

    @Autowired
    private PaymentFeignService paymentFeignService;
    @GetMapping("customer/feign/payment/{id}")
    public CommonResult<Payment>  getPaymentById(@PathVariable("id") Long id){

        return paymentFeignService.getPaymentById(id);
    }
}
